<template>
    <div>
      <!-- 面包屑导航条 -->
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>数据中心</el-breadcrumb-item>
        <el-breadcrumb-item>客户管理</el-breadcrumb-item>
        <el-breadcrumb-item>客户详情</el-breadcrumb-item>
      </el-breadcrumb>
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <el-button style="float: right; padding: 3px 0" icon="el-icon-close" circle @click="toList">返回</el-button>
        </div>
        <el-form :model="CustomerMx" label-width="70px" >
          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="名称">
                <el-input v-model="CustomerMx.name"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="发票类型">
                <el-input v-model="CustomerMx.invoiceType"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="发票抬头">
                <el-input v-model="CustomerMx.invoiceTitle"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="税号">
                <el-input v-model="CustomerMx.invoiceNum"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="税率">
                <el-input v-model="CustomerMx.taxRate"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="公司地址">
                <el-input v-model="CustomerMx.address"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="所属行业">
                <el-input v-model="CustomerMx.industry"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row :gutter="22">
            <el-col :span="11">
              <el-form-item label="描述">
                <el-input v-model="CustomerMx.remarks"  size="small" disabled="disabled"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </el-card>
 </div>
</template>

<script>
    export default {
        name: "CustomerMx",
      data(){
          return{
         CustomerMx:{}
          }
      },
      methods:{
        getMx:function (id) { //查询
          this.$http.get("/customer/details/"+id).then((res)=>{
            this.CustomerMx=res.data.result;
            if(this.CustomerMx.invoiceType==0){
              this.CustomerMx.invoiceType="增值税普通发票"
            }else{
              this.CustomerMx.invoiceType="增值税专用发票"
            }
            if(this.CustomerMx.industry==0){
              this.CustomerMx.industry="机械制造"
            }
            if(this.CustomerMx.industry==1){
              this.CustomerMx.industry="房地产"
            }
            if(this.CustomerMx.industry==2){
              this.CustomerMx.industry="金融"
            }
            if(this.CustomerMx.industry==3){
              this.CustomerMx.industry="教育"
            }
            if(this.CustomerMx.industry==4){
              this.CustomerMx.industry="服务"
            }
          })
        },
        toList:function () {
         this.$router.push("/customer")
        }
      },
      mounted(){
       var id = this.$route.query.id;
       this.getMx(id);
       alert(id)
      }
    }

</script>

<style scoped>

</style>
